[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Mark Saves Current Start of Heap
Mark(var P : <pointer>);
Stores the current start-of-the-heap address in P. After heap space
has been allocated with the procedure New, a call to Release(P) will
deallocate all of the space above P, thus freeing this space for new
heap allocation.
P A pointer to any data type.
Notes: Never use Mark and Dispose in the same program. Using
them together will cause unpredictable results.
All this procedure does is move the heap pointer to
the pointer variable P. To deallocate the space from P
to the top of the heap space, just call the procedure
Release(P). Release just sets the heap pointer to P
and updates the amount of heap memory available.
Note that the Mark/Release pair can not release space
used by variables in the middle of the heap. Use
Dispose if this operation is needed.
Use the function MemAvail to determine the amount of
space available on the heap at any given time.
-------------------------------- Example ---------------------------------
Mark(TempPtr); { mark current top of heap }
...
Release(TempPtr); { restore heap to that mark }
See Also:
Release
New
Dispose
MemAvail
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson